package com.ark.cloud.java.persistence.entity;

/**
 * Copyright(c): 2021 Cloud-Ark Inc.
 * Author(s): Ma Wei (mawei@cloud-ark.com)
 */


import com.ark.cloud.java.persistence.enums.EAirOpsCondition;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.NoArgsConstructor;

/**
 * 飞机状态变化事件
 */
@TableName("aircraft_status")
@Builder
@AllArgsConstructor


public class AircraftStatus {
//    @TableId(type = IdType.AUTO, value = "id")
    private Long id;

    @TableField("entity_id")
    private String entityId;

    @TableField("timestamp")
    private String timestamp;                 //   时间		1
    @TableField("last_status")
    private short lastStatus;         //   飞机上一状态	short	1
    @TableField("cur_status")
    private short curStatus;             //	  飞机当前	short	1

    public AircraftStatus() {
        lastStatus = (short) EAirOpsCondition.Airborne.ordinal();
        curStatus = (short) EAirOpsCondition.Airborne.ordinal();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getEntityId() {
        return entityId;
    }

    public void setEntityId(String entityId) {
        this.entityId = entityId;
    }

    public String getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(String timestamp) {
        this.timestamp = timestamp;
    }

    public short getLastStatus() {
        return lastStatus;
    }

    public void setLastStatus(short lastStatus) {
        this.lastStatus = lastStatus;
    }

    public short getCurStatus() {
        return curStatus;
    }

    public void setCurStatus(short curStatus) {
        this.curStatus = curStatus;
    }

    @Override
    public String toString() {
        return "AircraftStatus{" +
                "aircraftStatusId='" + entityId + '\'' +
                ", timestamp='" + timestamp + '\'' +
                ", lastStatus=" + lastStatus +
                ", curStatus=" + curStatus +
                '}';
    }
}
